package com.winforsys.yellowbook;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

public class SettingsActivity extends Activity {
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.settings);
        
        
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    	// TODO Auto-generated method stub
    	
    	menu.add(0, 0, 0, "Contacts").setIcon(android.R.drawable.btn_star_big_off);
    	menu.add(0, 1, 0, "Location").setIcon(android.R.drawable.btn_star_big_off);
    	menu.add(0, 2, 0, "Faverate").setIcon(android.R.drawable.btn_star_big_off);
    	menu.add(0, 3, 0, "Settings").setIcon(android.R.drawable.btn_star_big_off);
    	
    	return super.onCreateOptionsMenu(menu);
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    	// TODO Auto-generated method stub
    	switch (item.getItemId()) {
    	case 0:
    	{
    		Intent intent = new Intent(this, AllContactsActivity.class);
    		startActivity(intent);
    	}
    		break;
    	case 1:
    	{
    		Intent intent = new Intent(this, LocationsActivity.class);
    		startActivity(intent);
    	}
    		break;
    	case 2:
    	{
    		Intent intent = new Intent(this, FaveratesActivity.class);
    		startActivity(intent);
    	}
    		break;
    	case 3:
    	{
    		Intent intent = new Intent(this, SettingsActivity.class);
    		startActivity(intent);
    	}
    		break;
    	}
    	
    	return super.onOptionsItemSelected(item);
    }
}
